﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Configuration;
using System.Web.Security;
using System.Data.SqlClient;
using StudentHookups.WCF;

namespace StudentHookups
{
    public partial class _Default : System.Web.UI.Page
    {
        WCF.WCFClient client = new WCF.WCFClient();

        protected void Page_Load(object sender, EventArgs e)
        {
            //Retries 3 users from database and posts them as example on welcoming page
            UserComposite example1 = client.GetUser((Guid)Membership.GetUser("PremiumMember").ProviderUserKey);
            UserComposite example2 = client.GetUser((Guid)Membership.GetUser("CoolGuySwe").ProviderUserKey);
            UserComposite example3 = client.GetUser((Guid)Membership.GetUser("NotGenericGirl").ProviderUserKey);

            lblName1.Text = "<b>Fullname: </b>" + " " + example1.Firstname + " " + example1.Lastname;
            lblAccountName1.Text = "<b>Username: </b>" + " " + example1.Username;
            lblAge1.Text = "<b>Age: </b>" + " " + example1.Age.ToString();
            lblGender1.Text = "<b>Gender: </b>" + " " + example1.Gender;
            tbInfo1.Text = example1.Information;
            profileImage1.ImageUrl = example1.Image;

            lblName2.Text = "<b>Fullname: </b>" + " " + example2.Firstname + " " + example2.Lastname;
            lblAccountName2.Text = "<b>Username: </b>" + " " + example2.Username;
            lblAge2.Text = "<b>Age: </b>" + " " + example2.Age.ToString();
            lblGender2.Text = "<b>Gender: </b>" + " " + example2.Gender;
            tbInfo2.Text = example2.Information;
            profileImage2.ImageUrl = example2.Image;

            lblName3.Text = "<b>Fullname: </b>" + " " + example3.Firstname + " " + example3.Lastname;
            lblAccountName3.Text = "<b>Username: </b>" + " " + example3.Username;
            lblAge3.Text = "<b>Age: </b>" + " " + example3.Age.ToString();
            lblGender3.Text = "<b>Gender: </b>" + " " + example3.Gender;
            tbInfo3.Text = example3.Information;
            profileImage3.ImageUrl = example3.Image;

        }

        

    }
}


